Two Dimensional Plots:
    Function Plots | Countour Plots | Velocity Fields | Manipulating the Devices | Java Device

    JAVA DEVICE

    - Use of the Java graphical device in Xi -

    The idea of the Java implementation of the graph device is to keep the code most portable. But at the time it is more an experiment than a serious application, because the employed development kits are still buggy (above all the Linux JDK) and the window applet is more than 10 times slower than the C++ implementation. Another disadvantage is, that this device has not the full functionality of the normal C++ implemented window - see the description below.

    Running the Java device requires an implementation of JDK 1.0 or later versions. See also Javasoft homepage.

    To start a java window you have to input one of the following keywords: java, javapath, javadriver, javadisplay and/or javaport. To start the window, enter

    (  1)>window(0,\java,\bpp=24);
    
    Also you can start a window session on another host, e.g. by
    (  2)>window(1,\java="ursun6",
    \javapath="/home/obelix.tp1/nottelm/java/beta/bin/java",
    \javadriver="/home/obelix.tp1/nottelm/java/beta/src/my/image/XiWindow",
    \position={100,30},\size={300,400});
    
    Here the parameter java contains the internet host address, javapath describes the absolute path of the java interpreter and javadriver describes the absolute path of the applet. Optionally javadisplay sets the actual display (e.g. \javadisplay="galilei") and javaport sets the base portnumber of the corresponding communication socket (> 1024). Notice, that the external host has to be permitted to access on your screen. Also notice, that every java window occupies two port numbers. If one of this is destroyed, choose a new number which differs about at least 2 from the old number.

    Let's close the second window again:

    (  3)>window(1,\close);
    
    A little example is given here:
    (  4)>image=read_targa("gra83.tga");
    (  5)>show(image);
    (  6)>contour(image[*,*,0],\nlevels=4);
    
    The result is:

    In opposite to the normal xigraph window you cannot manipulate the sizes or positions of single graphical objects like plots or images, because the java graph device only receives elemantary commands like 'draw lines' or 'draw points'. It cannot differ between a simple command like this and a complex command like 'plot' or 'contour'.


    Rechts Index Index Index Linls © 1995 by Bodo Junglas, Klaus Spanderen and Fabian Weis
    - Last revised: June 22 1996